package net.wangds.auth.department.repo.rdbms;

import net.wangds.auth.department.entity.GeneralDepartmentJobRef;
import net.wangds.data.RemovedEnum;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface DepartmentJobRefRepo extends JpaRepository<GeneralDepartmentJobRef, String> {

    Optional<GeneralDepartmentJobRef> findByDeptIdAndJobId(String deptId, String jobId);

    List<GeneralDepartmentJobRef> findByJobIdAndRemoved(String jobId, RemovedEnum normal);


    List<GeneralDepartmentJobRef> findByDeptIdAndRemoved(String deptId, RemovedEnum normal);
}
